﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics.Contracts;

namespace Granite
{
	/// <summary>
	/// 
	/// </summary>
	public static class StringUtilities
	{
		/// <summary>
		/// Used for platforms that don't natively support this function.
		/// </summary>
		/// <param name="value"></param>
		/// <returns></returns>
		[Pure]
		public static bool IsNullOrWhiteSpace(this string value)
		{
#if WINDOWS_PHONE
			return (value == null || string.IsNullOrEmpty(value.Trim()));
#else
			return string.IsNullOrWhiteSpace(value);
#endif
		}
	}
}

